import '@/styles/global-modal.css'
import '@/styles/theme.css'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
import { createPinia } from 'pinia'
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

// highlight.js
import hljsVuePlugin from '@highlightjs/vue-plugin'
import 'highlight.js/styles/github-dark.css'

// ECharts 相关全局注册
import { BarChart, PieChart } from 'echarts/charts'
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components'
import * as echarts from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import VueECharts from 'vue-echarts'

import {
    BellOutlined,
    HeartOutlined,
    InstagramOutlined,
    MessageOutlined,
    SettingOutlined,
    ShareAltOutlined,
    TwitterOutlined,
    WechatOutlined,
    WeiboOutlined,
} from '@ant-design/icons-vue'

echarts.use([CanvasRenderer, PieChart, BarChart, TooltipComponent, LegendComponent, GridComponent])

const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(Antd)
app.use(hljsVuePlugin) // 注册 highlight.js 插件

app.component('VChart', VueECharts)
app.component('BellOutlined', BellOutlined)
app.component('SettingOutlined', SettingOutlined)
app.component('HeartOutlined', HeartOutlined)
app.component('MessageOutlined', MessageOutlined)
app.component('ShareAltOutlined', ShareAltOutlined)
app.component('WeiboOutlined', WeiboOutlined)
app.component('WechatOutlined', WechatOutlined)
app.component('TwitterOutlined', TwitterOutlined)
app.component('InstagramOutlined', InstagramOutlined)

app.mount('#app')
